import {
    HTTP_GET,
    HTTP_POST,
    HTTP_PUT
} from "../../http/lib/index.js";

export const InspectionApi = {
    // 获取巡检记录-资产
    getInspectionHistoryAssetList: (params, cb) => HTTP_POST('/wechat/ins/record/ast/list', params, cb),
    // 获取巡检记录-单元
    getInspectionHistoryUnitList: (params, cb) => HTTP_POST('/wechat/ins/record/unit/list', params, cb),
    //  获取巡检记录详情
    getInspectionHistoryDetail: (id, cb) => HTTP_GET(`/wechat/ins/record/${id}`, null, cb),

    // 异常整改-资产
    getRectifiactionAssetList: (params, cb) => HTTP_POST('/wechat/ins/rectify/ast/list', params, cb),
    // 异常整改-单元
    getRectifiactionUnitList: (params, cb) => HTTP_POST('/wechat/ins/rectify/unit/list', params, cb),
    // 异常整改-详情
    getRectifiactionDetail: (id, cb) => HTTP_GET(`/wechat/ins/rectify/detail/${id}`, null, cb),
    // 异常整改-整改
    handleRectifiaction: (params, cb) => HTTP_PUT("/wechat/ins/rectify/rectify", params, cb),
    // 巡检任务-资产列表
    getInspectionTaskAssetList: (params, cb) => HTTP_POST('/wechat/ins/task/ast/list', params, cb),
    // 巡检任务-单元
    getInspectionTaskUnitList: (params, cb) => HTTP_POST('/wechat/ins/task/unit/list', params, cb),
    // 巡检任务-转交
    inspectionTaskTransfer: (params, cb) => HTTP_POST('/wechat/ins/task/transmit', params, cb),
    // 巡检任务-巡检
    inspectionTaskHandle: (params, cb) => HTTP_PUT('/wechat/ins/task/editTask', params, cb),
    // 巡检任务-详情
    getInspectionDetail: (id) => HTTP_GET(`/wechat/ins/task/${id}`)

}